import Vue from 'vue'
import App from './App.vue'
import router from './router'
import axios from "axios"

Vue.config.productionTip = false
Vue.prototype.$http=axios;
//请求拦截器
axios.interceptors.request.use(function(config){
  config['headers']['Authorization']="Bearer "+localStorage.getItem("token");
  return config;
})
axios.interceptors.request.use((res)=>{
  console.log("返还拦截器",res);
  return res
})
new Vue({
  router,
  render: h => h(App)
}).$mount('#app');
